package com.xhs.main.service.rsb.impl;

import com.xhs.main.dao.rsb.RsbContractDao;
import com.xhs.main.entity.rsb.RsbContract;
import com.xhs.main.service.rsb.RsbContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author author
 * @create 2020-10-24-14:07
 */
@Service
public class RsbContractServiceImpl implements RsbContractService {
    @Autowired
    RsbContractDao rsbContractDao;

    @Override
    public void insertContract(RsbContract rsbContract) {
        rsbContractDao.insertContract(rsbContract);
    }

    @Override
    public void deleteContract(String rsbConNum) {
        rsbContractDao.deleteContract(rsbConNum);
    }

    @Override
    public List<RsbContract> selectChoose(String rsbConNum, Date rsbConEnd1, Date rsbConEnd2) {
        List<RsbContract> rsbContracts = rsbContractDao.selectChoose(rsbConNum, rsbConEnd1, rsbConEnd2);
        return rsbContracts;
    }

    @Override
    public RsbContract selectByUserName(String userName) {
        RsbContract rsbContract = rsbContractDao.selectByUserName(userName);
        return rsbContract;
    }
}
